<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel app\models\search\QuarterSetting */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '财年设置';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="quarter-setting-index">

    <h1><?= Html::encode($this->title) ?></h1>

    <div class="col-md-12 col-sm-12 col-lg-10">
    <p>
        <?= Html::a('创建 Quarter Setting', ['create'], ['class' => 'btn btn-success']) ?>
        <?= Html::a('开启新的一财年', ['open'], ['class' => 'btn btn-success']) ?>
        <?= Html::a('关闭本财年', ['close'], ['class' => 'btn btn-success']) ?>
        <?= Html::a('开启本财年', ['opennow'], ['class' => 'btn btn-success']) ?>
        <?= Html::a('结算本财年', ['settle'], ['class' => 'btn btn-success']) ?>
    </p>
    <pre>
结算财年前，建议备份数据库
mysqldump -h 数据库域名 -u 数据库用户名 -p密码 导出库名>mydb.sql
mysql -h 数据库域名 -u 数据库用户名 -p密码 导入库名 < mydb.sql
rm mydb.sql -f</pre>
    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [
            'id',
            'start_at',
            'end_at',
            'is_open',
            'is_close',
            'is_settle',
            //'create_at',
            //'update_at',
        ],
    ]); ?>
    </div>
</div>
